(function (root,factory) {
    if(typeof module ==='object' &&typeof module.exprots==='object'){
        module.exprots=factory();
    }else{
        root.ZZL =root.$=factory();
    }
})(this,function () {
    var ZZL={
        type:function (obj) {
            if(obj==null){
                return obj +"";
            }
            return typeof obj==='object'||typeof obj==='function'?class2type[Object.
                prototype.toString.call(obj)] ||
                'object': typeof obj;
        },
        isFunction(obj) {
            return this.type(obj)==='function';
        }
    };
    var class2type ={};
    //生成对象映射
    "Boolean Number String Function Array Date RegExp Object Error Null Undefined".split(" ").map(
        function (item,index) {
            class2type["[object "+item+"]"]=item.toLowerCase();
        }
    );
    return ZZL;
})